%{
#include <stdio.h>
#include <string>
#include "src/myheader.h"
using std::string;
#define YYSTYPE const char *
#include "y.tab.h"
extern "C" {
    int yywrap(void);
    int yylex(void);
};
%}
char [a-zA-Z]
num [0-9]
ws [" "\t]
ident {char}({char}|{num})* 
OP [+\-*/<>]
%%
if return IF;
goto return GOTO;
"=" return ASSIGN;
\n return NEWLINE;
{ident} {yylval = strdup(yytext); return IDENT;}
{num}+ {yylval = strdup(yytext); return NUM;}
{ident}: {
	    labelTable[string(yytext , yytext + yyleng - 1)] = yylineno;
	 }
{ws} {}
{OP} {}
%%
